package com.hy.service;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hy.Result.ResponseResult;
import com.hy.mapper.VaccineMapper;
import com.hy.pojeVo.QueryParam;
import com.hy.pojo.vaccine.Vaccine;
import com.hy.service.VaccineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【vaccine(疫苗信息表：存储疫苗的详细信息，包括基本信息、价格、库存、使用说明等)】的数据库操作Service实现
* @createDate 2025-03-17 15:00:26
*/
@Service
public class VaccineServiceImpl extends ServiceImpl<VaccineMapper, Vaccine>
    implements VaccineService {
    @Autowired
    private VaccineMapper vaccineMapper;
    @Override
    public ResponseResult searchWord(QueryParam queryParam) {
        PageHelper.startPage(queryParam.getPageNum(), queryParam.getPageSize());
        LambdaQueryWrapper<Vaccine> l = new LambdaQueryWrapper();
        List<Vaccine> vaccine = vaccineMapper.selectList(l);
        PageInfo<Vaccine> pageInfo = new PageInfo<>(vaccine);
        return ResponseResult.okResult(200,"查询成功!",pageInfo);
    }
}




